Skip to content

Parametrize acceptance action with pytest parallel worker count#730

Merged
alexott merged 7 commits intomainfrom
param_parallel_runs
Apr 28, 2026
Merged

Parametrize acceptance action with pytest parallel worker count#730
alexott merged 7 commits intomainfrom
param_parallel_runs

Conversation

@mwojtyczka
Copy link
Copy Markdown
Contributor

@mwojtyczka mwojtyczka commented Apr 21, 2026

Summary

  • Add a new n input to the acceptance GitHub Action (default 10) for configuring pytest-xdist parallel workers. Propagates via the PYTEST_N env var to pytest_run.py; Go tests are unaffected.
  • Updated depreciated sdk methods to fix make fmt

Test plan

  • make fmt passes locally
  • make test passes locally
  • Run the action in a downstream repo with n: '4' and confirm pytest uses -n 4
  • Run the action without setting n and confirm default of 10

Context: we need to be able to reduce parallel test execution in DQX as 10 parallel runs creates a high contention of testing clusters. This would require a new release.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds configurability for pytest-xdist parallelism in the acceptance GitHub Action and reduces staticcheck noise from a tracked deprecation migration.

Changes:

  • Introduce a new n action input (default 10) and propagate it via PYTEST_N into the acceptance test runtime.
  • Update pytest_run.py to read the worker count from PYTEST_N instead of hard-coding -n 10.
  • Add an acceptance/staticcheck.conf to suppress SA1019 warnings during make fmt until a separate migration completes.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
acceptance/action.yml Adds the new n input with default 10.
acceptance/main.go Forwards the n input into the action’s environment as PYTEST_N.
acceptance/ecosystem/pytest_run.py Uses PYTEST_N to set pytest-xdist -n.
acceptance/staticcheck.conf Globally disables SA1019 for the acceptance module.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread acceptance/action.yml
Comment thread acceptance/main.go
Comment thread acceptance/ecosystem/pytest_run.py Outdated
Comment thread acceptance/main.go
Addresses PR #730 review:
- Trim + validate `n` in main.go as positive integer or "auto", returning
  a clear error for invalid values instead of letting pytest-xdist fail
  with an opaque CLI error.
- Treat an empty/whitespace PYTEST_N env var as unset in pytest_run.py so
  `-n ''` is never passed to pytest.

Co-authored-by: Isaac
pytest_run.py already strips and defaults PYTEST_N, and pytest-xdist
surfaces clear CLI errors for non-integer values. Remove the Go-side
validation so the action is a simple pass-through — this also keeps
`n: 'auto'` working as a pytest-xdist native mode.

Co-authored-by: Isaac
Exercises the n → PYTEST_N wiring when the skipped integration test is
run manually with real credentials.

Co-authored-by: Isaac
@mwojtyczka
Copy link
Copy Markdown
Contributor Author

mwojtyczka commented Apr 28, 2026

@alexott Let me also test manually e2e. I will ping you when it's done

@mwojtyczka
Copy link
Copy Markdown
Contributor Author

@alexott this is ready to merge

@alexott alexott merged commit 419e53f into main Apr 28, 2026
1 check passed
@alexott alexott deleted the param_parallel_runs branch April 28, 2026 12:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants